package com.mane.pojo;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.util.Date;

@Data
@TableName("wnxt_trainer")
public class Trainer {
    @TableId(value = "id",type = IdType.AUTO)
    private Long id;

    @NotNull(message = "请输入培训师名称")
    @TableField("name")
    private String name;

    @TableField("intro")
    private String intro;

    @TableField("career")
    private String career;

    @TableField("level")
    private Integer level;

    @TableField("avatar")
    private String avatar;

    @TableField("sort")
    private String sort;

    @TableField("is_deleted")
    @TableLogic
    private Integer isDeleted;

    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date updateTime;
}
